package com.jiangwh.domain.services.impl;

import javax.ws.rs.core.Response;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jiangwh.dao.client.SAMClient;
import com.jiangwh.dao.mapper.Dao;
import com.jiangwh.domain.services.Business;

@Service("business")
public class BusinessImpl implements Business {
	

	@Autowired
	Dao dao;	
	
	@Autowired
	@Qualifier("samClient")
	SAMClient client;
	
	@Transactional(rollbackFor=RuntimeException.class)
	public String test(){	
		return dao.getMacBindInfos().toString();
	}

	@Override
	public String test(String arg) {
		return dao.getMacBindInfos().toString();
	}

	@Override
	public String getSchoolKey(String schoolName) {
		//TODO 到云端取
		return "key"+schoolName;
	}

	@Override
	public Response getOnlineStatus(String userId, String schoolKey) {
		
		return null;
	}

	@Override
	public Response getAccountInfo(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getAccountDetail(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getOnlineDetail(String userId, int pageNo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getAccountFlow(String userId, int pageNo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response postSuspendUser(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response postResumeUser(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response putCardRecharge(String userId, String password,
			String chargeCardType, String cardNo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response postUserInfo(String userinfo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response deleteUserInfo(String userinfo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getUserInfo(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getUserMABInfo(String userId, int pageNo, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response postkickOnlineUser(String userId, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response putDeviceAlias(String userId, String mac, String type,
			String name, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response deleteDeviceAlias(String userId, String mac, String type,
			String name, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response postPriorityGrab(String userId, String priorityStr,
			String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response deleteMABBindInfo(String userId, String mac,
			String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response deleteBindUserInfo(String userId, String mac,
			String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response getAPInfo(String APIP, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Response putPhoneInfo(String info, String schoolKey) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String headLogin(String userName, String password) {
		return client.headLogin(userName, password);
	}
	
}
